package com.lzw.service.impl.admin;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.lzw.mapper.admin.BillsManage2Mapper;
import com.lzw.pojo.Bills;
import com.lzw.service.admin.BillsManage2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

@Service
public class BillsManage2ServiceImpl implements BillsManage2Service {

    @Autowired
    private BillsManage2Mapper billsManage2Mapper;

    @Override
    public List<Bills> list(Integer pageNum, Integer pageSize, String medicine, LocalDate billDate) {
        PageHelper.startPage(pageNum,pageSize);
        List<Bills> list = billsManage2Mapper.list(medicine, billDate);
        Page<Bills> bills = (Page<Bills>) list;
        return bills;    }
}
